Conversation
gabyvon725
reviewed
Mar 15, 2018
| break | ||
| res = resize(frame,512, 512); | ||
| frames.append(res) | ||
|
|
Owner
There was a problem hiding this comment.
Line 34 這邊的512為在main.py Line41 中定義的tensor尺寸。在main.py Line 48設置了新參數image_h和image_w來存儲這兩個數值。這邊可以用這兩個參數替換原來的512~
Author
|
謝謝提醒,當初沒有發現orz
2018-03-15 23:13 GMT+08:00 gabyvon725 <notifications@github.com>:
… ***@***.**** commented on this pull request.
------------------------------
In 2018-Python-Practice-master/styler/video.py
<#4 (comment)>
:
> @@ -28,9 +28,16 @@ def read_frames(self, image_h, image_w):
'''
frames = []
# 5-1 /5-2 Read video and collect them
-
- self.frames = ... # 5-3 let object have the result
- return ... # return your results
+ while(True):
+ ret, frame = self.cap.read()
+
+ if(frame is None):
+ break
+ res = resize(frame,512, 512);
+ frames.append(res)
+
Line 34 resize(frame,512, 512) 這邊的512為在main.py Line41
中定義的tensor尺寸。在main.py Line 48設置了新參數image_h和image_
w來存儲這兩個數值。這邊可以用這兩個參數替換原來的512~
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQCbSEDThU2eWYEDG125-GfFNYXZzvhcks5teoUNgaJpZM4STJNo>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
student 張言鴻 104062127